package com.ft.oa.enums;

/**
 * 投标结果
 * @author liyansheng
 * @ClassName TenderResult
 * @date 2022-1-10 10:48:05
 */
public enum TenderResult {

    EVALUATION(1,"评审中"),
    FOR_OPENING(2,"待开标"),
    WINNING(3,"中标"),
    NOT_WINNING(4,"未中标");

    //名称
    private String name;
    //编码
    private int code;
    //构造函数
    TenderResult(int code, String name){
        this.code = code;
        this.name = name;
    }

    /**
     * 获取名称
     * @param code
     * @return
     */
    public static String getByCode(int code) {
        for (TenderResult value : TenderResult.values()) {
            if (value.code == code) {
                return value.name;
            }
        }
        return "";
    }
}
